#pragma once
#include <Windows.h>


struct Robotino_Camera_Interface
{
public:
	unsigned char						*buffer;

	UINT								Height,
										Width;

	bool								isReady,
										isReadyForTrack;

	Robotino_Camera_Interface() 
	{
		isReady				=	0; //false
		isReadyForTrack		=	0; //false
		Height				=	0;
		Width				=	0;
	}
	void Update(UINT height, UINT width, const unsigned char *data)
	{
		// while(isReady);

		if(width != Width || Height != height)
		{
			if(!(Height != 0 || Width != 0))
			{
				delete buffer;
			}
			buffer	=	new unsigned char [ 3 * height * width ];
			Height	=	height;
			Width	=	width;
		}
		memcpy(buffer, data, width * height * 3);
		isReady			=	true;
		isReadyForTrack	=	true;
	}
};
Robotino_Camera_Interface				Cam_interface;